<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>延迟显示</title>
</head>
<body>
<div id="change" class="change">
    <h1>Hello, World!</h1>
    <h1 style="display: none">Hello, Vue!</h1>
</div>

<script>
    let elements = document.querySelectorAll("#change > h1");

    setTimeout(()=>{
        for (let i = 0; i < elements.length; i++) {
            let attribute = elements[i].getAttribute("style");
            if (attribute === "display: none"){
                elements[i].style.display = "block"
            }
        }
    }, 3000)

</script>
</body>
</html>